#!/bin/bash

test -e bin/ctorrent && exit

echo "####################"
echo "# $CTORRENT"
echo "####################"

cd $DIR
test ! -e $CTORRENT.tar.gz && wget http://surfnet.dl.sourceforge.net/sourceforge/dtorrent/ctorrent-dnh3.3.2.tar.gz
tar xvfz $CTORRENT.tar.gz
cd $CTORRENT

test "$TARGET_HOST" && ./configure --host=$TARGET_HOST
test -z "$TARGET_HOST" && ./configure

make clean
make

test "$STRIP" && $STRIP ctorrent
test -z "$STRIP" && strip ctorrent
